widget-factory: Demo different Frame border-styles
authorDaniel Boles <dboles@src.gnome.org>
Mon, 2 Oct 2017 19:22:41 +0000 (20:22 +0100)
committerDaniel Boles <dboles.src@gmail.com>
Mon, 2 Oct 2017 19:22:41 +0000 (20:22 +0100)
This shows not all, but the interesting/less predictable styles, and
the ones that correspond to the :shadow-types that were here before.

demos/widget-factory/widget-factory.css
demos/widget-factory/widget-factory.ui

index 1782e6db5f65eb0432273f90fe1a069807e7c963..1674f189aca5dcd9d685d69493fe972be31f342d 100644 (file)
@@ -2,3 +2,25 @@
   padding: 0;
   outline-width: 0;
 }
+
+.border-inset {
+  border-style: inset;
+}
+
+.border-outset {
+  border-style: outset;
+}
+
+.border-groove {
+  border-style: groove;
+}
+
+.border-ridge {
+  border-style: ridge;
+}
+
+/* These effects use 2 lines, so show them */
+.border-groove,
+.border-ridge {
+  border-width: 2px;
+}
index 253a4aed6889f8c7d876cdea4eb3145d320fcf24..62beb14cd13f4a4953678321160c6ce56ef2c774 100644 (file)
@@ -1157,10 +1157,12 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
                         <property name="hexpand">1</property>
                         <child>
                           <object class="GtkFrame" id="frame1">
-                            <property name="shadow_type">in</property>
+                            <style>
+                              <class name="border-inset"/>
+                            </style>
                             <child type="label">
                               <object class="GtkLabel" id="label1">
-                                <property name="label" translatable="yes">&lt;b&gt;In&lt;/b&gt;</property>
+                                <property name="label" translatable="yes">&lt;b&gt;Inset&lt;/b&gt;</property>
                                 <property name="use_markup">1</property>
                               </object>
                             </child>
@@ -1168,10 +1170,12 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
                         </child>
                         <child>
                           <object class="GtkFrame" id="frame2">
-                            <property name="shadow_type">out</property>
+                            <style>
+                              <class name="border-outset"/>
+                            </style>
                             <child type="label">
                               <object class="GtkLabel" id="label2">
-                                <property name="label" translatable="yes">&lt;b&gt;Out&lt;/b&gt;</property>
+                                <property name="label" translatable="yes">&lt;b&gt;Outset&lt;/b&gt;</property>
                                 <property name="use_markup">1</property>
                               </object>
                             </child>
@@ -1182,9 +1186,12 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
                         </child>
                         <child>
                           <object class="GtkFrame" id="frame3">
+                            <style>
+                              <class name="border-groove"/>
+                            </style>
                             <child type="label">
                               <object class="GtkLabel" id="label17">
-                                <property name="label" translatable="yes">&lt;b&gt;Etched in&lt;/b&gt;</property>
+                                <property name="label" translatable="yes">&lt;b&gt;Groove&lt;/b&gt;</property>
                                 <property name="use_markup">1</property>
                               </object>
                             </child>
@@ -1195,10 +1202,12 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
                         </child>
                         <child>
                           <object class="GtkFrame" id="frame4">
-                            <property name="shadow_type">etched-out</property>
+                            <style>
+                              <class name="border-ridge"/>
+                            </style>
                             <child type="label">
                               <object class="GtkLabel" id="label18">
-                                <property name="label" translatable="yes">&lt;b&gt;Etched out&lt;/b&gt;</property>
+                                <property name="label" translatable="yes">&lt;b&gt;Ridge&lt;/b&gt;</property>
                                 <property name="use_markup">1</property>
                               </object>
                             </child>